import 'package:equatable/equatable.dart';
import 'package:excel_utils/pages/cpc_report/bean/china_post_file_bean.dart';
import 'package:excel_utils/pages/cpc_report/bean/china_post_luggage_bean.dart';
import 'package:excel_utils/pages/cpc_report/bean/fee_item_bean.dart';
import 'package:excel_utils/pages/cpc_report/bean/waybill_managent_bean.dart';
import 'package:excel_utils/pages/cpc_report/cpc_file/bean/cpc_file_result_bean.dart';

final class CpcFileAnalysisMergeState extends Equatable {
  final bool waybillManagementLoadingState;
  final double waybillManagementProgress;
  final List<WaybillManagementBean> waybillManagementList;

  final bool chinaPostFileLoadingState;
  final double chinaPostFileProgress;
  final List<ChinaPostFileBean> chinaPostFileList;

  final bool feeItemLoadingState;
  final double feeItemProgress;
  final List<FeeItemBean> feeItemList;

  // 合并
  final bool mergeLoadingState;
  final  List<CpcFileResultBean>? cpcFileResult;
  final double? mergeProgress;

  // 写入
  final double writeProgress;
  final String writeMsg;
  final bool writeLoadingState;

  const CpcFileAnalysisMergeState({
    required this.waybillManagementLoadingState,
    required this.waybillManagementProgress,
    required this.chinaPostFileLoadingState,
    required this.chinaPostFileProgress,
    required this.feeItemLoadingState,
    required this.feeItemProgress,
    required this.waybillManagementList,
    required this.chinaPostFileList,
    required this.feeItemList,
    required this.writeProgress,
    required this.writeMsg,
    required this.mergeLoadingState,
    required this.mergeProgress,
    required this.cpcFileResult,
    required this.writeLoadingState,
  });

  CpcFileAnalysisMergeState copyWith({
    bool? waybillManagementLoadingState,
    double? waybillManagementProgress,
    List<WaybillManagementBean>? waybillManagementList,
    bool? chinaPostFileLoadingState,
    double? chinaPostFileProgress,
    List<ChinaPostFileBean>? chinaPostFileList,
    bool? feeItemLoadingState,
    double? feeItemProgress,
    List<FeeItemBean>? feeItemList,

    bool? mergeLoadingState,
    double? mergeProgress,
    List<CpcFileResultBean>? cpcFileResult,

    bool? writeLoadingState,
    double? progress,
    double? writeProgress,
    String? writeMsg,
  }) {
    return CpcFileAnalysisMergeState(
      waybillManagementLoadingState: waybillManagementLoadingState ?? this.waybillManagementLoadingState,
      waybillManagementProgress: waybillManagementProgress ?? this.waybillManagementProgress,
      waybillManagementList: waybillManagementList ?? this.waybillManagementList,
      chinaPostFileLoadingState: chinaPostFileLoadingState ?? this.chinaPostFileLoadingState,
      chinaPostFileProgress: chinaPostFileProgress ?? this.chinaPostFileProgress,
      chinaPostFileList: chinaPostFileList ?? this.chinaPostFileList,
      feeItemLoadingState: feeItemLoadingState ?? this.feeItemLoadingState,
      feeItemProgress: feeItemProgress ?? this.feeItemProgress,
      feeItemList: feeItemList ?? this.feeItemList,
      writeProgress: progress ?? this.writeProgress,
      writeMsg: writeMsg ?? this.writeMsg,
      mergeLoadingState: mergeLoadingState ?? this.mergeLoadingState,
      mergeProgress: mergeProgress ?? this.mergeProgress,
      cpcFileResult: cpcFileResult ?? this.cpcFileResult,
      writeLoadingState: writeLoadingState ?? this.writeLoadingState,
    );
  }

  @override
  List<Object?> get props => [
        waybillManagementLoadingState,
        waybillManagementProgress,
        waybillManagementList,
        chinaPostFileLoadingState,
        chinaPostFileProgress,
        chinaPostFileList,
        feeItemLoadingState,
        feeItemProgress,
        feeItemList,
        writeMsg,
    mergeLoadingState,
    mergeProgress,
    cpcFileResult,
    writeLoadingState,
    writeProgress,
      ];
}
